package com.pcbly.web.components.utils.property;



import org.apache.commons.lang.math.NumberUtils;

public abstract class AbstractOfficeProperties implements OfficeProperties {

	public AbstractOfficeProperties() {
	}

	public boolean getBooleanProperty(String propertyKey) {
		return Boolean.valueOf((String) get(propertyKey)).booleanValue();
	}

	public boolean getBooleanProperty(String propertyKey, boolean defaultValue) {
		String value = (String) get(propertyKey);
		if (value != null)
			return Boolean.valueOf(value).booleanValue();
		else
			return defaultValue;
	}

	public int getIntProperty(String property, int defaultValue) {
		return NumberUtils.toInt((String) get(property), defaultValue);
	}

	public int getIntProperty(Object x0, int x1) {
		return getIntProperty((String) x0, x1);
	}

	public boolean getBooleanProperty(Object x0, boolean x1) {
		return getBooleanProperty((String) x0, x1);
	}

	public boolean getBooleanProperty(Object x0) {
		return getBooleanProperty((String) x0);
	}

}
